package com.bailian.snails.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gaoxu
 * date: Created on 2021/5/31 下午1:50
 */

@RestController
@RequestMapping(value = "/user")
public class UserController {

    @GetMapping(value = "/test测试代码")
    public String test() {
        return "hello User";
    }

    @RequestMapping(value = "/findOrderByUserId/{userId}", method = RequestMethod.GET)
    public String findOrderByUserId(@PathVariable("userId") Integer userId) {
        return "user:" + userId;
    }
}
